package com.ms.exception;

/**
 * User: gmc
 * Date: 19/02/14
 */
public class ExceptionUtils {
    private static final String LINE_SEPARATOR = "\r\n";

    public static String getFullExceptionMsg(Throwable throwable) {
        String[] stackFrames = org.apache.commons.lang3.exception.ExceptionUtils.getStackFrames(throwable);
        StringBuilder sb = new StringBuilder();
        for (String stackFrame : stackFrames) {
            sb.append(stackFrame);
            sb.append(LINE_SEPARATOR);
        }
        return sb.toString();
    }

}
